package com.qianmi.kfk.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.kafka.core.KafkaTemplate;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description
 * @Author 蔡超[of3379]
 * @date 2020.07.05 17:40
 */
@RestController
public class Server {
    @Autowired
    private KafkaTemplate kafkaTemplate;

    @GetMapping("/send")
    public String send(String msg) {
        kafkaTemplate.send("yemu", msg);
        return "ok";
    }
}
